<?php

/**
 * @author Samrat Khan & Sadik Sarfaraz - 11:45:37 AM Aug 21, 2013 
 */
require('top.inc.php');
if(isset($_SESSION['user']) && $_SESSION['user']['utype'] == 1 || $_SESSION['user']['utype'] == 2 || $_SESSION['user']['utype'] == 3 || $_SESSION['user']['utype'] == 4) {
    $sess_cusID = $_SESSION['user']['cus_id'];    
    $rows = pickupReceivedReport($sess_cusID, $db);
    
    echo "<table id=\"showstatus\" class=\"row-fluid table table-striped table-bordered\">";
        echo "<tr>";
            echo "<th>". $stock_in['productid'] ."</th>";
            echo "<th>". $stock_out['requestnumber'] ."</th>";
            echo "<th>". $stock_out['siteid'] ."</th>";
            echo "<th>". $stock_out['eng_id'] ."</th>";
        echo "</tr>";
    foreach ($rows as $row) {
        echo "<tr>";
            echo "<td>". $row['productid'] ."</td>";
            echo "<td>". $row['requestnumber'] ."</td>";
            echo "<td>". $row['siteid'] ."</td>";
            echo "<td>". getName('engineerinfo', 'engname', 'eng_id', $row['eng_id'], $db) ."</td>";
        echo "</tr>";
    }
echo "<table>";
echo "<div id='show'></div>";

} else {
    header("Location: login.php");
}
include ('bottom.inc.php');
?>
